import React, { Component } from "react";
import NormalLoginForm from "./Form";
import { Redirect } from "react-router-dom";
import memoryUtils from "@/utils/memory.js";
import "./index.less";
export default class Login extends Component {
  render() {
    const user = memoryUtils.user;
    if (user._id) {
      return <Redirect to="/" />;
    }

    return (
      <div className="Login">
        <header>
          <h1>后台管理系统</h1>
        </header>
        <section>
          <div className="loginComponent">
            <h2 className="header_title">欢迎登录</h2>
            <div className="formControl">
              <NormalLoginForm></NormalLoginForm>
            </div>
          </div>
        </section>
      </div>
    );
  }
}
